'use strict';

App.controller('dashboardController', ['$rootScope', '$scope', '$state', 'Page', function($rootScope, $scope, $state, Page) {


    $scope.$on('$viewContentLoaded', function() {
        // initialize core components
        Metronic.initAjax();
    });
    // set sidebar closed and body solid layout mode
     	$('.easy-pie-chart .number.transactions').easyPieChart( {
			animate : 1000,
			size : 75,
			lineWidth : 3,
			barColor : Metronic.getBrandColor('yellow')
		});

		$('.easy-pie-chart .number.visits').easyPieChart( {
			animate : 1000,
			size : 75,
			lineWidth : 3,
			barColor : Metronic.getBrandColor('green')
		});

		$('.easy-pie-chart .number.bounce').easyPieChart( {
			animate : 1000,
			size : 75,
			lineWidth : 3,
			barColor : Metronic.getBrandColor('red')
		});
		
		$("#sparkline_bar").sparkline([8, 9, 10, 11, 10, 10, 12, 10, 10, 11, 9, 12, 11, 10, 9, 11, 13, 13, 12], {
                type: 'bar',
                width: '100',
                barWidth: 5,
                height: '55',
                barColor: '#35aa47',
                negBarColor: '#e02222'
            });

            $("#sparkline_bar2").sparkline([9, 11, 12, 13, 12, 13, 10, 14, 13, 11, 11, 12, 11, 11, 10, 12, 11, 10], {
                type: 'bar',
                width: '100',
                barWidth: 5,
                height: '55',
                barColor: '#ffb848',
                negBarColor: '#e02222'
            });

            $("#sparkline_line").sparkline([9, 10, 9, 10, 10, 11, 12, 10, 10, 11, 11, 12, 11, 10, 12, 11, 10, 12], {
                type: 'line',
                width: '100',
                height: '55',
                lineColor: '#ffb848'
            });
}]);